sysroot: Add a try_lock() API
authorColin Walters <walters@verbum.org>
Thu, 7 May 2015 02:19:05 +0000 (22:19 -0400)
committerColin Walters <walters@verbum.org>
Sun, 10 May 2015 20:20:53 +0000 (16:20 -0400)
commit2dfe24632a4d1d73ca5676b503135090f092db22
tree596abfd7530e73a117eb159557443cd23052a002
parentd0edf6334625d9f65917a1bfbe42076f52b0fe8f
sysroot: Add a try_lock() API

The blocking locking API wasn't sufficient for use in the rpm-ostree
daemon; it really wants to know if the lock is held, then continue to
do other things (like service DBus requests), and get notification
when the lock is available.

We also add an async variant that can be called if the lock is not
available.

Implement a higher level "loop until lock is available" method in the
`ostree admin` commandline.
doc/ostree-sections.txt
libglnx
src/libostree/ostree-sysroot.c
src/libostree/ostree-sysroot.h
src/ostree/ot-admin-builtin-deploy.c
src/ostree/ot-admin-functions.c
src/ostree/ot-admin-functions.h